DROP TABLE IF EXISTS jms_ods.yl_lmdm_sys_third_code;
CREATE EXTERNAL TABLE jms_ods.yl_lmdm_sys_third_code(
 ID bigint comment "",  --NUMBER(11)
 CODE string comment "三段码",  --NVARCHAR2(20)
 NETWORK_ID bigint comment "派件网点ID",  --NUMBER(11)
 NETWORK_NAME string comment "派件网点名称",  --NVARCHAR2(60)
 NETWORK_CODE string comment "派件网点编码",  --NVARCHAR2(20)
 DELIVER_ID bigint comment "派件员ID",  --NUMBER(11)
 DELIVER_NAME string comment "派件员名称",  --NVARCHAR2(60)
 DELIVER_CODE string comment "派件员编码",  --NVARCHAR2(20)
 IS_ENABLE int comment "是否启用:1启用,2不启用",  --NUMBER(6)
 IS_DELETE int comment "是否删除:1未删除,2已删除",  --NUMBER(6)
 CREATE_BY bigint comment "创建人ID",  --NUMBER(11)
 UPDATE_BY bigint comment "最后更新人ID",  --NUMBER(11)
 CREATE_BY_NAME string comment "创建人名称",  --NVARCHAR2(50)
 UPDATE_BY_NAME string comment "最后修改人名称",  --NVARCHAR2(50)
 CREATE_TIME timestamp comment "创建时间",  --DATE
 UPDATE_TIME timestamp comment "更新时间",  --DATE
 VERSION string comment "版本号",  --NVARCHAR2(10)
 SORT int comment "排序"  --NUMBER(6)
 )
 COMMENT '三段码维护表'
 PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
 STORED AS PARQUET
 LOCATION '/dw/hive/jms_ods.db/external/yl_lmdm_sys_third_code'
 TBLPROPERTIES (
 'discover.partitions'='false',
 'parquet.column.index.access'='true'
 );

MSCK REPAIR TABLE jms_ods.yl_lmdm_sys_third_code;